package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.demo.entity.PostComment;
import com.example.demo.entity.responseJson.PostOnelevelCommentRes;
import com.example.demo.entity.responseJson.PostTwolevelCommentRes;
import com.example.demo.mapper.base.PostCommentBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * 帖子评论表(PostComment)表数据库访问层
 *
 * @author 杨丽辉
 * @since 2021-03-17 11:23:43
 */
@Component
@Mapper
public interface PostCommentMapper extends PostCommentBaseMapper {
    List<PostOnelevelCommentRes> queryponelevelComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);
    List<PostTwolevelCommentRes> queryptwoelevelComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);
    List<PostTwolevelCommentRes> querymyComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);
    List<PostTwolevelCommentRes> queryreplymyComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);
    int countposttwoComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);
    int countOneComment(@Param(Constants.WRAPPER) Wrapper<PostComment> ew);

}
